package com.api.shopapi.service.impl;

import com.api.shopapi.entity.CashierCartGoods;
import com.api.shopapi.mapper.CashierCartGoodsMapper;
import com.api.shopapi.service.CashierCartGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("CashierCartGoodsServiceImplOne")
public class CashierCartGoodsServiceImpl implements CashierCartGoodsService {

    @Autowired
    private CashierCartGoodsMapper cashierCartGoodsMapper;

    @Override
    public int insert(CashierCartGoods cashierCartGoods) {
        return cashierCartGoodsMapper.insert(cashierCartGoods);
    }

    @Override
    public int update(CashierCartGoods cashierCartGoods) {
        return cashierCartGoodsMapper.update(cashierCartGoods);
    }

    @Override
    public int delete(String cashierCartGoodsCode) {
        return cashierCartGoodsMapper.delete(cashierCartGoodsCode);
    }

    @Override
    public List<CashierCartGoods> getList() {
        return cashierCartGoodsMapper.getList();
    }

    @Override
    public CashierCartGoods getByCashierCartGoodsCode(String cashierCartGoodsCode) {
        return cashierCartGoodsMapper.getByCashierCartGoodsCode(cashierCartGoodsCode);
    }

    @Override
    public List<CashierCartGoods> getListByCashierCartBusinessCode(String cashierCartBusinessCode) {
        return cashierCartGoodsMapper.getListByCashierCartBusinessCode(cashierCartBusinessCode);
    }

    @Override
    public List<CashierCartGoods> getListByGoodsCode(String goodsCode) {
        return cashierCartGoodsMapper.getListByGoodsCode(goodsCode);
    }
}
